home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Use of getch()...
- Date: Sat, 20 Jan 96 01:31:13 GMT
- Organization: none
- Message-ID: <822101473snz@genesis.demon.co.uk>
- References: <4do95b$jio@klein.delphi.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4do95b$jio@klein.delphi.com>
- stucros@mci.newscorp.com "Stuart Crosby" writes:
-
- >I need to use the function getch() in a loop but I also need for a null
- >character to be returned during each iteration if the user has not
- >entered a character. I need this so that the program will not stop and
- >wait for input at the point that I have getch() in the routine. Is this
- >possible?
-
- getch() isn't a function that is defined by the C language so its actual
- functionality depends upon your particular system. One approach may
- be to test whether the input buffer is empty and call getch() only when
- it is not. The comp.lang.c FAQ has some pointers in this area. in section
- 19. You can ftp it from rtfm.mit.edu under /pub/usenet/comp.lang.c.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-